1
using System
.Collections
;
2 using System
.Collections
.Generic
;
6 public class PageManager
: MonoBehaviour
{
8 public GameObject
[] Pages
;
10 public GameObject left
;
12 public GameObject right
;
14 private int pageCounter
;
16 private int PageMax
= 1;
21 PageMax
= Pages
.Length
;
22 left
.SetActive(false);
27 foreach (GameObject gameObject
in Pages
)
29 gameObject
.SetActive(false);
31 if (Pages
[pageCounter
])
33 Pages
[pageCounter
].SetActive(true);
37 public void LeftPage()
39 pageCounter
= (pageCounter
- 1) % PageMax
;
43 pageCounter
+= PageMax
;
47 public void RightPage()
49 pageCounter
= (pageCounter
+ 1) % PageMax
;
51 if (left
.activeSelf
== false)